/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ua.i.kotionokyurievna.jewelry.domain.employee;

import ua.i.kotionokyurievna.jewelry.domain.person.Person;
import ua.i.kotionokyurievna.jewelry.domain.job.Job;

/**
 *
 * @author Kateryna_Reznik
 */
public class Employee extends Person{
    private int employeeId;
    private Job job;
    private double salary;
    private int passportId;
    
    public Employee(){
        
    }

    public Employee(Person person, Job job, double salary, int passportId) {
        super(person);
        this.job = job;
        this.salary = salary;
        this.passportId = passportId;
    }

    public Employee(int employeeId, Person person, Job job, double salary,
            int passportId) {
        super(person);
        this.employeeId = employeeId;
        this.job = job;
        this.salary = salary;
        this.passportId = passportId;
    }

    public int getEmployeeId() {
        return employeeId;
    }

    public Job getJob() {
        return job;
    }

    public void setJob(Job job) {
        this.job = job;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public int getPassportId() {
        return passportId;
    }

    public void setPassportId(int passportId) {
        this.passportId = passportId;
    }

    @Override
    public String toString() {
        return "Employee{" + "job=" + job + 
                ", salary=" + salary + ", passportId=" + passportId + '}';
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 83 * hash + this.passportId;
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Employee other = (Employee) obj;
        if (this.passportId != other.passportId) {
            return false;
        }
        return true;
    }    
    
}
